int bit_count(unsigned int i)
{
	int count=0;

	while(i){
		count+=i&0x00000001;
		i>>=1;
	}

	return count;
}